package com.nxmu.service.impl;

import com.nxmu.dao.ResearchEnterDao;
import com.nxmu.entity.ResearchEnter;
import com.nxmu.service.ResearchEnterService;

import java.util.List;

public class ResearchEnterServiceImpl implements ResearchEnterService {

    private ResearchEnterDao researchEnterDao;

    public void setResearchEnterDao(ResearchEnterDao researchEnterDao) {
        this.researchEnterDao = researchEnterDao;
    }

    @Override
    public void enterResearchEnter(ResearchEnter researchEnter) {
        researchEnterDao.save(researchEnter);
    }

    @Override
    public List<ResearchEnter> getAll() {
        String hql = "FROM ResearchEnter";
        return researchEnterDao.findAll(hql);
    }
}
